//
//  ViewController.m
//  animate
//
//  Created by iD Student on 7/9/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    animatedImage.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"IMG0.png"],
                                     [UIImage imageNamed:@"IMG1.png"],
                                     [UIImage imageNamed:@"IMG2.png"],
                                     [UIImage imageNamed:@"IMG3.png"],
                                     [UIImage imageNamed:@"IMG4.png"],
                                     [UIImage imageNamed:@"IMG5.png"],
                                     [UIImage imageNamed:@"IMG6.png"],
                                     [UIImage imageNamed:@"IMG7.png"],
                                     [UIImage imageNamed:@"IMG8.png"],
                                     [UIImage imageNamed:@"IMG9.png"],
                                     [UIImage imageNamed:@"IMG10.png"],
                                     [UIImage imageNamed:@"IMG11.png"],
                                     [UIImage imageNamed:@"IMG12.png"],
                                     [UIImage imageNamed:@"IMG13.png"],
                                     [UIImage imageNamed:@"IMG14.png"],
                                     [UIImage imageNamed:@"IMG15.png"],
                                     [UIImage imageNamed:@"IMG16.png"],
                                     [UIImage imageNamed:@"IMG17.png"],
                                     [UIImage imageNamed:@"IMG18.png"],
                                     [UIImage imageNamed:@"IMG19.png"],
                                     [UIImage imageNamed:@"IMG20.png"],
                                     [UIImage imageNamed:@"IMG21.png"],
                                     [UIImage imageNamed:@"IMG22.png"],
                                     [UIImage imageNamed:@"IMG23.png"],
                                     [UIImage imageNamed:@"IMG24.png"],
                                     [UIImage imageNamed:@"IMG25.png"],
                                     [UIImage imageNamed:@"IMG26.png"],
                                     [UIImage imageNamed:@"IMG27.png"],
                                     [UIImage imageNamed:@"IMG28.png"],
                                     [UIImage imageNamed:@"IMG29.png"],
                                     [UIImage imageNamed:@"IMG30.png"],
                                     [UIImage imageNamed:@"IMG31.png"],
                                     [UIImage imageNamed:@"IMG32.png"],
                                     [UIImage imageNamed:@"IMG33.png"],
                                     [UIImage imageNamed:@"IMG34.png"],nil];
    animatedImage.animationDuration = 2.9;
    animatedImage.image = [UIImage imageNamed:@"IMG0.PNG"];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(IBAction)startButtonPressed:(id)sender
{
    [animatedImage startAnimating];
}

-(IBAction)stopButtonPressed:(id)sender
{
    [animatedImage stopAnimating];
    animatedImage.image = [UIImage imageNamed:@"IMG0.PNG"];
}
@end
